//2009/08/18 21:48:15
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class UniqueDigits
{
public:
    int count(int n)
    {
		int ret = 0;
		for(int i=1; i<n; i++)
			if(check(i)) 
				ret++, cout << i << endl;
		return ret;
    }
private:
    bool check(int n)
    {
		set<int> v;
		int m = v.size();
		while(n!=0)
		{
			int a = n % 10;
			n /= 10;
			v.insert(a);
			if(v.size() == m) return false;
			m++;
		}
		return true;
    }
};
